package com.zs.mp.enums;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.baomidou.mybatisplus.annotation.IEnum;
import com.zs.mp.constant.EnumConstant;

import lombok.Getter;
import lombok.extern.slf4j.Slf4j;

@Getter
@Slf4j
public enum Gender {
	
	FEMALE("0","女"),MALE("1","男");
//	@EnumValue
	public String genderCode;
	public String genderName;
	
	
	private Gender(String genderCode,String genderName) {
		this.genderCode = genderCode;
		this.genderName = genderName;
	}
	
	public static Gender getGenderValue(String genderCode) {
		for (Gender gender : values()) {
			if (gender.getGenderCode().equals(genderCode)) {
				return gender;
			}
		}
		return null;
	}
	
//	implements IEnum<String>
//	@Override
//	public String getValue() {
//		log.info("{},{}",this.genderCode,this.genderName);
//		return this.genderCode;
//	}
}
